﻿var _adHandlerPath = "http://ad.abchina.com/AdHub.ashx"; //TO CONFIG
ShowAds();
function ShowAds() {
    var divs = document.getElementsByName("adArea");
    for (var i = 0; i < divs.length; i++) {
        var cornerthemeParam = "";
        try {
        if (divs[i].getAttribute("cornertheme") != null&&divs[i].getAttribute("cornertheme") != "")
           cornerthemeParam="&cornertheme=" +divs[i].getAttribute("cornertheme");
        }
        catch(e){}
        divs[i].innerHTML = "<iframe style='border: 0; margin: 0; padding:0;overflow: hidden; width: 100%; height: 100%;' scrolling='no' src='"
        + _adHandlerPath + "?AdAreaId=" + divs[i].getAttribute("adAreaId")
        + "&RefererUrl=" + encodeURI(window.location) + cornerthemeParam + "'></iframe>";
    } 
}

